/*
* pps_bom
*/
package com.pitop.material.api;

import com.pitop.material.entity.MaterialLog;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 物料日志 api请求熔断器
 *
 * @author berton
 */
@FeignClient(value = "pps-cloud-provider", fallback = MaterialLogFeignApiImpl.class)
public interface MaterialLogFeignApi {
    /**
     * 查询MaterialLog一个详情信息
     *
     * @param id
     * @return MaterialLog
     */
    @GetMapping(value = "/materialLog/load")
    MaterialLog load(@RequestParam("id") Long id);


    /**
     * 根据条件id查询MaterialLog一个详情信息
     *
     * @param id
     * @return MaterialLog
     */
    @GetMapping(value = "/materialLog/load/id/{id}")
    MaterialLog loadById(@RequestParam("id") Long id);

    /**
     * 删除MaterialLog
     */
    @DeleteMapping("/materialLog/delete")
    void delete(@RequestParam("id") Long id);


    /**
     * 查询MaterialLog信息集合
     *
     * @return 分页对象
     */
    @PostMapping(value = "/materialLog/list")
    List<MaterialLog> list(@RequestBody MaterialLog materialLog, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize);


    /**
     * 查询MaterialLog信息集合
     *
     * @return 分页对象
     */
    @GetMapping(value = "/materialLog/list/by")
    List<MaterialLog> listByPk(@RequestParam("id") Long id, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize);


    /**
     * 统计MaterialLog信息数量根据主键
     *
     * @return 总条数
     */
    @GetMapping(value = "/materialLog/count/by")
    Integer count(@RequestParam("id") Long id);

    /**
     * 统计MaterialLog信息数量
     *
     * @return 总条数
     */
    @PostMapping(value = "/materialLog/count")
    Integer count(@RequestBody MaterialLog materialLog);


    /**
     * 创建MaterialLog
     *
     * @return MaterialLog
     */
    @PostMapping("/materialLog/build")
    MaterialLog build(@RequestBody MaterialLog materialLog);


    /**
     * 修改MaterialLog
     *
     * @return MaterialLog
     */
    @PutMapping("/materialLog/modify")
    MaterialLog modify(@RequestBody MaterialLog materialLog);


}
